import type { RNTesterModuleInfo } from '../types/RNTesterTypes';

const Components: Array<RNTesterModuleInfo> = [
  {
    key: 'ButtonExample',
    category: 'UI',
    module: require('../examples/Button/ButtonExample'),
  },
  {
    key: 'ReactNativeButton',
    category: 'Basic',
    module: require('../examples/react-native-button/index'),
  },
  {
    key: 'rn-bugly',
    category: 'Tools',
    module: require('../examples/rn-bugly/BuglyDemo').default,
  },
  {
    key: 'ZipArchive',
    category: 'Tools',
    module: require('../examples/react-native-zip-archive/ZipArchiveDemo').default,
  },
  {
    key: 'op-sqlite',
    category: 'Tools',
    module: require('../examples/op-sqlite/TestForOpSqlite').default,
  },
  {
    key: 'realm-js',
    category: '数据库',
    module: require('../examples/realm-js/demoIndex').default,
  }
];

const APIs: Array<RNTesterModuleInfo> = [
  {
    key: 'BorderExample',
    category: 'UI',
    module: require('../examples/Border/BorderExample'),
  },
];

const Modules: any = {};

APIs.concat(Components).forEach(Example => {
  Modules[Example.key] = Example.module;
});

const RNTesterList = {
  APIs,
  Components,
  Modules,
};

export default RNTesterList;
